Number.prototype.toTime = function (): string {
  const val = this as number;
  if (val === 0) {
    return "";
  }

  const t = new Date(val);
  const Y = t.getFullYear();
  const M = (t.getMonth() + 1).toString().padStart(2, "0");
  const D = t.getDate().toString().padStart(2, "0");
  const h = t.getHours().toString().padStart(2, "0");
  const m = t.getMinutes().toString().padStart(2, "0");
  const s = t.getSeconds().toString().padStart(2, "0");
  return `${Y}-${M}-${D} ${h}:${m}:${s}`;
};
